<tagLib name="html" />
<include file="Public:header" />
<load href ="__PUBLIC__/Js/common.js" />
<script type="text/javascript" charset="utf-8" src="__PUBLIC__/Js/editor/kindeditor.js"></script>
<script type="text/javascript" charset="utf-8" src="__PUBLIC__/Js/jquery.js"></script>
<script type="text/javascript">
    KE.show({
        id : 'traffic_1'
   });
   KE.show({
        id : 'community_1'
   });
   KE.show({
        id : 'around_1' //TEXTAREA输入框的ID
   });
    KE.show({
        id : 'otherinfo_1' //TEXTAREA输入框的ID
   });
   function addRowplusPrice(tablename){
				var tablename = tablename;
				var trstr = jQuery("#"+tablename).find("tr").eq(1).html();
				var pattern = /value=[a-zA-Z0-9_]*/ig;
				trstr = trstr.replace(pattern,'');
				trstr = "<tr>"+trstr+"</tr>";
				jQuery('#'+tablename).append(trstr);
			}
			function removerow(obj){
				var objnum = jQuery(obj).parent().parent().parent().children().size();
				if(objnum>2)
				{
					jQuery(obj).parent().parent().remove();
				}
			}
      function addRowplus(tablename){
				var tablename = tablename;
				var trstr = jQuery("#"+tablename).find("tr").eq(0).html();
				var pattern = /value=[a-zA-Z0-9_]*/ig;
				trstr = trstr.replace(pattern,'');
				trstr = "<tr>"+trstr+"</tr>";
				jQuery('#'+tablename).append(trstr);
			}
</script>
<div id="main" class="main" >
<div class="content">
<div class="title">新增房型 [ <a href="__URL__">返回列表</a> ]</div>
<form method='post' id="form1" action="__URL__/insert/" enctype="multipart/form-data">
<table cellpadding=3 cellspacing=3>
<tr>
	<td></td>
	<td style="float:right">
            <input type="submit" value="新 增" class="small submit">
            <input type="reset" class="reset imgButton" onclick="javascript:history.back()" value="返回" >
	</td>
</tr>
<tr>
	<td class="tRight" >房型名称：</td>
	<td class="tLeft" >
            <input type="text" class="medium bLeftRequire"  check='Require' warning="房型名不能为空" id="name" name="name" value="">
            所属公寓：
            <select name="hotel_id">
                <volist name="hotel" id="dis">
                <option value="{$dis.id}">{$dis.name}</option>
                </volist>
            </select>
        </td>
</tr>

<tr>
	<td class="tRight" >常规价：</td>
	<td class="tLeft" >
            日租价<input type="text" name="day_price" value="" class="small">
            周租价<input type="text" name="week_price" value="" class="small">
            月租价<input type="text" name="month_price" value="" class="small">
        </td>
</tr>
<tr>
	<td class="tRight" >自定义价格：</td>
	<td class="tLeft" >
            <input type="text" name="custom_price" value="" class="large"> (如月，季，年等的价格)
        </td>
</tr>

<tr>
    <td class="tRight" >户型：</td>
	<td class="tLeft" >
            <select name="layout">
                <volist name="layout" id="la">
                <option value="{$key}">{$la}</option>
                </volist>
            </select>
            装修程度：
            <select name="fitment">
                <option value="2">精装</option>
                <option value="1">普通</option>
                <option value="3">豪华</option>
            </select>
            物业类型：<select name="prop_type">
                <option value="1">住宅</option>
                <option value="2">酒店</option>
                <option value="3" selected>公寓</option>
            </select>
            面积：
            <input type="text" class="small bLeft" name="area" value="">平米
        </td>
</tr>

<tr>
	<td class="tRight" >配套设施：</td>
	<td class="tLeft" >
            <input type="checkbox" name="is_ac" checked>空调  <input type="checkbox" name="is_tv" checked>彩电  <input type="checkbox" name="is_freezer" checked>冰箱
            <input type="checkbox" name="is_washing" checked>洗衣机  <input type="checkbox" name="is_calorifier" checked>热水器  <input type="checkbox" name="is_microwave" checked>微波炉
            <input type="checkbox" name="is_internet" checked>宽带  <input type="checkbox" name="is_dvd" checked>DVD  <input type="checkbox" name="is_kitchen" checked>厨房
            <input type="checkbox" name="is_bathroom" checked>独立卫生  <input type="checkbox" name="is_wc" >合用卫生
        </td>
</tr>
<tr>
	<td class="tRight" >房型图片：</td>
	<td class="tLeft" bgcolor="whiteSmoke">
            默认图片<input type="file" class="large bLeft" name="logo"><br />

            其他图片：<table id="attach_pic">
		<tr class="firstline">
                    <td width="60%"><input type="file" class="large bLeft" name="attach[]">
                       排序:<input id="" type="text" name="pic_sort[]" /></td>
                    <td><img src="__PUBLIC__/Images/publish_x.png" alt="删除" onclick="removerow(this);"/></td>
                </tr>
            </table>
            <a href="javascript:void(0)" onclick="addRowplus('attach_pic');" class="addMore">添加更多</a>
        </td>
</tr>
<tr>
	<td class="tRight" >预订状态：</td>
	<td class="tLeft" ><input type="text" class="large bLeft" name="is_free" value=""></td>
</tr>

<tr>
	<td class="tRight" >预订要求：</td>
	<td class="tLeft" ><input type="text" class="large bLeft" name="requirement" value=""></td>
</tr>
<tr>
	<td class="tRight" >联系方式：</td>
	<td class="tLeft" >
            <textarea class="large bLeft"  id="traffic_1" name="contact" style="width:650px;height:200px;" ></textarea>
        </td>
</tr>
<tr>
	<td class="tRight" >房屋说明：</td>
	<td class="tLeft" >
            <textarea class="large bLeft"  id="around_1" name="description" style="width:650px;height:200px;" ></textarea>
        </td>
</tr>
<tr>
	<td class="tRight" >配套服务：</td>
	<td class="tLeft" >
            <textarea class="large bLeft"  id="community_1" name="service" style="width:650px;height:200px;" ></textarea>
        </td>
</tr>
<tr>
	<td class="tRight" >补充说明：</td>
	<td class="tLeft" >
            <textarea class="large bLeft" id="otherinfo_1" name="otherinfo" style="width:650px;height:200px;"></textarea>
        </td>
</tr>
<tr>
    <td class="tRight">SEO标题优化：</td>
    <td class="tLeft">
            标题：<input type="text" name="meta_title" value="{$vo.meta_title}" class="huge"> <br/>
            关键词：<input type="text" name="meta_keywords" value="{$vo.meta_keywords}" class="huge"><br/>
            描述：<input type="text" name="meta_description" value="{$vo.meta_description}" class="huge">
        </td>
</tr>
<tr>
	<td class="tRight">状态：</td>
	<td class="tLeft"><SELECT class="small bLeft"  name="status">
	<option value="1">启用</option>
	<option value="0">禁用</option>
	</SELECT> 排序：<input type="text" class="medium bLeft" name="sort" value=""></td>
</tr>

<tr>
	<td></td>
	<td class="center">
	<input type="submit" value="新 增" class="small submit">
            <input type="reset" class="reset imgButton" onclick="javascript:history.back()" value="返回" >
	</td>
</tr>
</table>
</form>
</div>
</div>
